<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Document</title>
  </head>

  <body>
    <script>
      for (var i = 1; i <= 6; i++) {
        //香皂的数量
        for (var j = 1; j <= 50; j++) {
          //牙刷的数量
          for (var y = 1; y <= 20; y++) {
            //判断100元刚好花完的情况
            if (i * 15 + j * 2 + y * 5 == 100) {
              //打印出洗发水，香皂，牙刷的数量组合刚好把100元花完
              document.write(
                "洗发液：" + i + ",香皂：" + j + ",牙刷：" + y + "<br/>"
              );
            }
          }
        }
      }
    </script>
  </body>
</html>
